<span style="display: none">
  <input
    type="checkbox"
    tiCheckgroup
    [items]="items"
    [(checkeds)]="checkeds"
    [valueKey]="valueKey"
    (checkedsChange)="onCheckedsChange($event)"
  />
</span>
<ng-container *ngFor="let item of items;let i = index">
  <ng-container *ngIf="itemTemplate else defaultTemplate;">
    <!-- 自定义label -->
    <span class="checkbox-group-item">
      <input type="checkbox" [id]="item.id" tiCheckitem [item]="item" [disabled]="item.disabled" />
      <ng-container *ngTemplateOutlet="itemTemplate;context: {$implicit: item,index: i}"></ng-container>
    </span>
  </ng-container>
  <ng-template #defaultTemplate>
    <!-- 默认label -->
    <input type="checkbox" [id]="appendId(item.id || i)" tiCheckitem [item]="item" [label]="item[labelKey]" [disabled]="item.disabled" />
  </ng-template>
</ng-container>
